package com.bite.ALGO;

public class ALGO_1 {

}

class Solution {
    public void moveZeroes(int[] nums) {
        for(int cur = 0,dest = -1; cur < nums.length; cur++) {
            if (nums[cur] != 0) {
                dest++;
                swap(nums,dest,cur);
            }
        }
    }

    public void swap(int[] nums, int x, int y) {
        int ret = nums[x];
        nums[x] = nums[y];
        nums[y] = ret;
    }
}

